package com.itheima.springbootwebtlias.mapper;


import com.itheima.springbootwebtlias.pojo.Clazz;
import com.itheima.springbootwebtlias.pojo.ClazzQuerParam;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ClazzMapper {

//    @Insert("insert into clazz (id, name, room, begin_date, end_date, master_id, subject, create_time, update_time) values ();")
    void addClazz(Clazz clazz);

    List<Clazz> getAllClazz();

    List<Clazz> selectbyCondition(ClazzQuerParam clazzQuerParam);


    Clazz selectByIdClazz(Integer id);

    void updateClazz(Clazz clazz);

    void deleteByIdClazz(Integer id);

    @MapKey("name")
    List<Map> selectCountData();
}
